package com.sky.mapper;

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DishFlaverMapper {


    void insertBatch(@Param("flavors") List<DishFlavor> flavors);

    void delByDishIds(@Param("dishIds") List<Long> dishIds);

    @Select("SELECT * FROM dish_flavor WHERE  dish_id=#{dishId}")
    List<DishFlavor> queryByDishId(Long dishId);

    //一对多关系
    @Select("SELECT  * FROM dish_flavor WHERE dish_id=#{dishId}")
    List<DishFlavor> queryByDishIdz(Long dishId);
}
